import request from "@/utils/request";

// 按照条件进行分页查询文档
export const gmtScriptinfopage = (data: object) => {
  return request.post("/gmtScript/info/page", data);
};

// 按照主键查询脚本信息
export const gmtScriptinfo = (id: string|string[]) => {
  return request.get("/gmtScript/info/"+ id);
};

//按照主键删除文档
export const gmtScriptInfoRemove = (data:Array<Object>) => {
  return request.post("/gmtScript/info/remove", data);
};

//新增脚本信息
export const gmtScriptinfosave = (data: object) => {
  return request.post("/gmtScript/info/save",data);
};

//保存静态脚本内容
export const gmtScriptinfosaveParam = (data: object) => {
  return request.post("/gmtScript/info/param/save",data);
};


//保存文档中的动态脚本配置
export const gmtScriptinfoSaveDynamic = (data: object,id?:string) => {
  return request.post("/gmtScript/info/save/dynamic/"+ id,data);
};

//保存脚本参数信息
export const gmtScriptinfoUpdate = (data: object) => {
  return request.post("/gmtScript/info/update",data);
};

//按照主键删除脚本
export const gmtScriptinfoRemove = (data: Array<Number>) => {
  return request.post("/gmtScript/info/remove",data);
};

//按照主键删除脚本
export const documentgmtScriptSave = (data: Array<Number>) => {
  return request.post("/document/gmtScript/save",data);
};

//执行脚本测试
export const gmtScriptDebug = (id: string|string[]) => {
  return request.get("/gmtScript/debug/"+ id);
};

//查看调试脚本执行结果
export const gmtScriptDebugInfo = (id: string|string[]) => {
  return request.get("/gmtScript/debug/info/"+ id);
};

//查看调试脚本执行结果
export const gmtScriptDebugInfoFile = (data: object) => {
  return request.get("/gmtTask/info/save/file",data);
};